- Assert 

Pre-condition: a condition that should hold before you call a method
Post-condition: a condition that should be satisfied after calling a method

Example#1: Assertion Demo

- Exceptions: Case Study
a. Copy a text file
b. Copy an image
c. Processing a network file (JSON: JavaScript Object Notation)

a. Copy a text file
FileWriter, BufferedWriter, PrintWriter: Streams

A stream is a collection of bytes/characters that are flowing out or into a process
Input stream: is attached to a source of input (file, network connection, etc...)
Output stream: linked with a sink (file, connection, etc...)

2 types of streams: 
1st type: char-based streams (Reader, Writer suffixes)
2nd type: byte-based stream (Stream suffix)

Example#2: Copy Text File

b. Copy an image file

FileInputStream + FileOutputStream

Example#3: Copy Image File

c. Dealing with a network file

3 main logical layers: 1) UI (Frontend); 2) Data layer; 3) Business logic (Backend)

Client <-HTTP-> server applications

URL: Uniform Resource Locator 









 






